package org.alanlau.hystrix.feign;

import feign.Logger;
import org.alanlau.hystrix.feign.factory.TestClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Bean;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * 测试
 *
 * @author alan
 * @version 1.0
 * @date 2020/9/16 23:56
 */
@FeignClient(value = "demo-server", fallbackFactory = TestClientFallbackFactory.class, configuration = TestClient.Config.class)
public interface TestClient {
    @GetMapping("/test/hello")
    String hello();

    class Config {
        @Bean
        public Logger.Level logger() {
            return Logger.Level.FULL;
        }
    }
}